package cn.xyy.system.dao;

import java.util.List;

import org.springframework.stereotype.Repository;

import cn.xyy.common.domain.system.auth.Department;
import cn.xyy.jdbc.BaseDaoImpl;

/**
 * 部门数据持久层
 * 
 * @author xyy
 *
 */
@Repository
public class DepartmentDao extends BaseDaoImpl {

	public List<Department> selectAllList() {
		String sql = "SELECT dept_id as id,name,  parent_id as parentId,levels,for_service as forService,sorts,status from t_sys_dept r  order by sorts asc ";
		return super.select(sql, Department.class);
	}

	public Department selectById(String id) {
		return super.selectById(id, Department.class);
	}

	public int insert(Department dept) {
		return super.insert(dept);
	}

	public int update(Department dept) {
		return super.update(dept);
	}

	public int delete(Department dept) {
		return super.delete(dept);
	}

}
